package com.ape.mapsa.produccion.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * The persistent class for the impresion database table.
 * 
 */
@Entity
public class Impresion implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;

	@Column(name = "fecha_fin")
	private Date fechaFin;

	@Column(name = "fecha_inicio")
	private Date fechaInicio;

	// bi-directional many-to-one association to OrdenProduccion
	@OneToOne
	@JoinColumn(name = "orden_produccion_id")
	private OrdenProduccion ordenProduccion;

	// bi-directional many-to-one association to Maquina
	@ManyToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "maquina")
	private Maquina maquina;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "creation_date")
	private Date creationDate;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "modification_date")
	private Date modificationDate;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "finalization_date")
	private Date finalizationDate;

	@Column(name = "created_by")
	private String createdBy;
	@Column(name = "modified_by")
	private String modifiedBy;

	// bi-directional many-to-one association to ImpPerformedWork
	@OneToMany(mappedBy = "impresion")
	private List<ImpPerformedWork> impPerformedWorks;

	// bi-directional many-to-one association to ImpProdScrap
	@OneToMany(mappedBy = "impresion")
	private List<ImpProdScrap> impProdScraps;

	@Column(name = "total_bobinas")
	private Integer totalBobinas;

	@Column(name = "total_kilos")
	private Float totalKilos;

	@Column(name = "total_mts")
	private Float totalMts;

	@Column(name = "total_scrap")
	private Float totalScrap;

	public Impresion() {
	}

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getFechaFin() {
		return this.fechaFin;
	}

	public void setFechaFin(Date fechaFin) {
		this.fechaFin = fechaFin;
	}

	public Date getFechaInicio() {
		return this.fechaInicio;
	}

	public void setFechaInicio(Date fechaInicio) {
		this.fechaInicio = fechaInicio;
	}

	public OrdenProduccion getOrdenProduccion() {
		return this.ordenProduccion;
	}

	public void setOrdenProduccion(OrdenProduccion ordenProduccion) {
		this.ordenProduccion = ordenProduccion;
	}

	public Maquina getMaquina() {
		return maquina;
	}

	public void setMaquina(Maquina maquina) {
		this.maquina = maquina;
	}

	public Date getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public Date getModificationDate() {
		return modificationDate;
	}

	public void setModificationDate(Date modificationDate) {
		this.modificationDate = modificationDate;
	}

	public String getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public String getModifiedBy() {
		return modifiedBy;
	}

	public void setModifiedBy(String modifiedBy) {
		this.modifiedBy = modifiedBy;
	}

	public List<ImpPerformedWork> getImpPerformedWorks() {
		return impPerformedWorks;
	}

	public void setImpPerformedWorks(List<ImpPerformedWork> impPerformedWorks) {
		this.impPerformedWorks = impPerformedWorks;
	}

	public List<ImpProdScrap> getImpProdScraps() {
		return impProdScraps;
	}

	public void setImpProdScraps(List<ImpProdScrap> impProdScraps) {
		this.impProdScraps = impProdScraps;
	}

	public Integer getTotalBobinas() {
		return totalBobinas;
	}

	public void setTotalBobinas(Integer totalBobinas) {
		this.totalBobinas = totalBobinas;
	}

	public Float getTotalKilos() {
		return totalKilos;
	}

	public void setTotalKilos(Float totalKilos) {
		this.totalKilos = totalKilos;
	}

	public Float getTotalMts() {
		return totalMts;
	}

	public void setTotalMts(Float totalMts) {
		this.totalMts = totalMts;
	}

	public Float getTotalScrap() {
		return totalScrap;
	}

	public void setTotalScrap(Float totalScrap) {
		this.totalScrap = totalScrap;
	}

	public Date getFinalizationDate() {
		return finalizationDate;
	}

	public void setFinalizationDate(Date finalizationDate) {
		this.finalizationDate = finalizationDate;
	}

}